package com.linb.pan.lock.core.annotation;


import com.linb.pan.lock.core.key.KeyGenerator;
import com.linb.pan.lock.core.key.StandardKeyGenerator;

import java.lang.annotation.*;

@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
public @interface Lock {

    /**
     * 锁名称
     */
    String name() default "";

    /**
     * 锁过期时间
     */
    long expireSecond() default 60L;

    /**
     * 锁的key 支持el表达式
     */
    String[] keys() default {};

    Class<? extends KeyGenerator> keyGenerator() default StandardKeyGenerator.class;

}
